// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 即将上映电影 POST /api/douban/v2/movie/coming_soon */
export async function movieComingSoonUsingPOST(
  body: API.DoubanPageRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageDoubanSearchMovieVO_>('/api/douban/v2/movie/coming_soon', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 正在上映电影 POST /api/douban/v2/movie/in_theaters */
export async function movieInTheatersUsingPOST(
  body: API.DoubanPageRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageDoubanSearchMovieVO_>('/api/douban/v2/movie/in_theaters', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 电影新片榜-接口有问题 POST /api/douban/v2/movie/new_movies */
export async function movieNewUsingPOST(
  body: API.DoubanPageRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageDoubanSearchMovieVO_>('/api/douban/v2/movie/new_movies', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据标签/关键字搜索电影条目 POST /api/douban/v2/movie/search */
export async function searchMovieUsingPOST(
  body: API.DoubanSearchMovieRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageDoubanSearchMovieVO_>('/api/douban/v2/movie/search', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据id查询电影详情 GET /api/douban/v2/movie/subject/${param0} */
export async function movieSubjectDetailUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.movieSubjectDetailUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseDoubanSearchMovieVO_>(`/api/douban/v2/movie/subject/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 电影TOP250 POST /api/douban/v2/movie/top250 */
export async function movieTop250UsingPOST(
  body: API.DoubanPageRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageDoubanSearchMovieVO_>('/api/douban/v2/movie/top250', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 北美票房榜 POST /api/douban/v2/movie/us_box */
export async function movieUsBoxUsingPOST(
  body: API.DoubanPageRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseDoubanMovieUsBoxVO_>('/api/douban/v2/movie/us_box', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 电影口碑榜-接口有问题 POST /api/douban/v2/movie/weekly */
export async function movieWeeklyUsingPOST(
  body: API.DoubanPageRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageDoubanSearchMovieVO_>('/api/douban/v2/movie/weekly', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
